package com.core.gui.dialogs;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class MainFrame extends JFrame {

	private JPanel contentPane;
	private final JMenuBar menuBar = new JMenuBar();
	private final JMenu mnFile = new JMenu("File");
	private final JMenuItem mntmLogOut = new JMenuItem("Log Out");
	private final JMenuItem mntmExit = new JMenuItem("Exit");
	private final JMenuItem ChangePasswordMenuItem = new JMenuItem("Change Password");
	private final JMenu mnTools = new JMenu("Tools");
	private final JMenuItem addeditContactsMenuItem = new JMenuItem("Add/Edit Contacts");

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainFrame frame = new MainFrame();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public MainFrame() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 636, 621);
		{
			setJMenuBar(menuBar);
		}
		{
			menuBar.add(mnFile);
		}
		{
			ChangePasswordMenuItem.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {
					ChangePasswordDialog changePasswordDialog = new ChangePasswordDialog();
					changePasswordDialog.setVisible(true);
				}
			});
			mnFile.add(ChangePasswordMenuItem);
		}
		{
			mnFile.add(mntmLogOut);
		}
		{
			mnFile.add(mntmExit);
		}
		{
			menuBar.add(mnTools);
		}
		{
			addeditContactsMenuItem.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent e) {
					AddContact addContact = new AddContact();
					addContact.setVisible(true);
				}
			});
			mnTools.add(addeditContactsMenuItem);
		}
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
	}
}
